#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
int n, m;
vector<int> p;
void init(int n) {
  p = vector<int>(n * 2 - 1);
  rep(i, 0, n * 2 - 2) p[i] = i + 1;
  shuffle(p.begin(), p.end(), mt);
}
bool ask(int x, int l, int r) {
  cout << "? " << x << ' ';
  cout << r + 1 - l << ' ';
  rep(i, l, r) cout << p[i] << " \n"[i == r];
  cout.flush();
  cin >> x;
  return x;
}
void ans(int x) {
  cout << "! " << x << endl;
  cout.flush();
}
void solve() {
  cin >> n;
  init(n);
  int l = 0, r = n * 2 - 2, mid = (l + r) >> 1;
  vector<int> left, right, both;
  rep(x, 1, n) {
    bool res1 = ask(x, l, mid);
    bool res2 = !res1 ? true : ask(x, mid + 1, r);
    if (res1 && res2)
      both.push_back(x);
    else if (res1)
      left.push_back(x);
    else
      right.push_back(x);
  }
  vector<int> cand;
  int L1 = left.size() * 2 + both.size();
  if (L1 != mid + 1 - l)
    swap(cand, left), r = mid;
  else
    swap(cand, right), l = mid + 1;
  for (int x : cand) {
    int lo = l, hi = r;
    while (lo != hi) {
      int mid = (lo + hi) >> 1;
      if (!ask(x, lo, mid))
        lo = mid + 1;
      else if (!ask(x, mid + 1, hi))
        hi = mid;
      else
        break;
    }
    if (lo == hi) {
      ans(x);
      return;
    }
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}